<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>字面量</title>
</head>
<body>
    
</body>
<script>
    let num = 123;
    var num2=123;

    console.log(age);
    var age = 20;

    //等价与下面的代码
    var age
    console.log(age);
    age=20

    // console.log(age2)
    // let age2=20;

    var nums =10;
    var nums =20

    // let nums2 = 10;
    // let nums2 = 20;

    if(1){
        let type1='javascript'
        var type2='java';
        function demo(){
            console.log(type1);
            console.log(type2);
        }
        demo();
    }
    console.log(type2)

    //console.log(type1)

    let obj='123.856'
    console.log(typeof obj);
    console.log(parseInt(obj))

    //0x 是16进制的表示
    let num3=0x10;
    console.log(num3)
    console.log(num3.toString())
   

</script>
</html>